home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
25
/
pak151.exe
/
pak
/
PAK.DOC
< prev
next >
Wrap
Text File
|
1989-01-15
|
38KB
|
1,255 lines
PAK
The File Compression Utility
Version 1.5
Copyright 1988, 1989
by
NoGate Consulting
P.O. Box 88115
Grand Rapids, MI 49518-0115
(616)455-6270
ALL RIGHTS RESERVED
_______
____|__ | (tm)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Introduction...............................................1
Purpose of PAK.........................................1
The Shareware Concept..................................1
Registration and Benefits..............................1
Other NoGate Products..................................2
List of Files..........................................2
Using the Command Line Version Of PAK......................3
A Note on the Interface................................3
Archive Files..........................................3
Creating An Archive................................3
The Add Command....................................3
The Move Command...................................4
The Update Command.................................4
The Freshen Command................................4
Extracting Files From An Archive.......................5
The Extract Command................................5
The Extract and Remove Command.....................5
Extracting Files to the Screen or Printer..........6
Managing Archives......................................6
Listing Files......................................6
Deleting Files.....................................7
Testing files......................................7
Adding Remarks to Archives.............................7
The /R option......................................8
The Revise command.................................8
Converting Archives from ARC and PKARC.................8
Options................................................8
Moving Files (/M)..................................9
Duplicate Files (/D)...............................9
Replacing Existing Files (/W)......................9
Use Remarks (/R)..................................10
Crunch and Squash (/C and /S).....................10
Encrypting Files (/G).............................10
Sorting Files (/O)................................11
Pack Archives (/P)................................11
The Temporary Path (/T)...........................11
General Syntax........................................12
Summary of Standard PAK Commands..................12
Limitations...........................................13
PAKINST (PAK install program).............................13
Command Definitions...................................14
Option Definitions....................................14
Comments..............................................15
EXEMAKE (Make self-extracting archives)...................15
Appendices................................................15
Release History.......................................15
PAK's Advanced Compression............................16
Technical Notes on File Formats.......................16
Credits...............................................17
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 1
Introduction
Purpose of PAK
PAK is a utility to create and maintain file archives in
compressed form. There are several advantages to compressing files.
On a hard disk, most files are accessed infrequently. Reducing
the size of these files allows more of them to remain on the hard
disk, where they are more accessible than on a floppy in a file
cabinet, and frees disk space for other use.
Backup is simpler, faster, and cheaper, since the files are
smaller and organized into related groups.
Most importantly, compressed files take less time to transmit via
modem, and time is money when the transmission is long distance, or to
a service such as CompuServe. Even on local computer bulletin boards,
reduced transmission time is an advantage.
PAK is intended as a replacement for ARC by System Enhancement
Associates and PKARC by Philip Katz. While PAK is roughly 2.5 times
as fast as ARC, speed is not the emphasis, and PAK does not attempt to
compete with PKARC in this respect. However, PAK produces archive
files that are consistently 50% to 90% of the size produced by either
ARC or PKARC, and supports files created by either program. In
particular, PAK handles large text files and non-text files of any
length much better than the either of these programs. In addition,
the full screen version is much easier to use than ARC or PKARC.
The Shareware Concept
PAK is distributed as shareware.
Shareware is commercial software distributed in an unconventional
manner. Microcomputers copy information very easily. Instead of
trying to frustrate this through copy protection, shareware takes
advantage of it to reach as many users as possible at the lowest cost.
Anyone may copy a shareware program and distribute it to whomever they
desire, provided they do not charge a fee or alter it.
Shareware isn't free. Serious shareware is as polished as any
conventional commercial product, and represents just as much
programming effort. If you use it regularly, the authors expect
compensation.
However, unlike conventional distribution, shareware allows you
to evaluate the product before you decide to purchase it. The price
is often lower, as well, because there are no advertising, packaging,
or distribution costs.
But it can only work with your support. If you are still using a
shareware product after a couple of weeks, then it is obviously worth
something to you, and you should register it.
Registration and Benefits
There are three versions of the compression routines in PAK
available. The first is the command line version, included in the
evaluation package (of which this file is a part) distributed as
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 2
shareware. Registration of this version is $15, and entitles you to a
disk with a copy of PAK registered in your name.
The second is the full screen version, also known as PAKF. PAKF
is a fully windowed program which displays archive contents and file
directories, and allows easy tagging of files to be compressed or
extracted. Registration of this version is $30, and entitles you to a
disk with both the full screen and command line versions.
The third, for programmers, is a library of data compression
routines suitable for inclusion in your own programs. This toolkit
can be used in practically any application, since all compression is
done on buffers in memory, not on disk. Registration of this version
is $50, and entitles you to a disk with object files suitable for use
with Turbo Pascal, C, or assembler, and the other two versions of PAK,
as well as example programs in Pascal and C.
To register your copy of PAK, see the enclosed order form.
Other NoGate Products
TRI_D, a programming toolkit for three dimensional graphics, with
support for wireframes and hidden surface removal. Reasonably fast
and very easy to use. Includes a TPU for Turbo Pascal (4.0 or 5.0)
and OBJ files for Turbo C. TRI_D is $30.
CONTOUR, a utility for creating contour maps from empirical data.
Quickly and accurately approximates the entire surface from relatively
few data points, and then draws lines at each elevation change. Also
creates AutoCad .DXF files. Primarily intended for surveyors, taking
a few minutes for a process that normally takes weeks, but useful to
anyone who wishes to plot three dimensional data. CONTOUR is $150.
NoGate consulting also provides custom solutions in a wide
variety of fields including databases, networking, simulations, and
telecommuncications. Inquire for further information.
List of Files
Your copy of PAK15 should contain:
PAK.EXE - PAK version 1.5
PAK.CNF - PAK configuration file.
PAK.DOC - This documentation file.
PAKINST.EXE - PAK installation program.
EXEMAKE.EXE - Utility to make self-extracting archives.
ORDER.FRM - Order form for registration.
UPDATE.FRM - Form for updates and upgrades.
SITE.FRM - Form for site licenses.
STDCFG.TXT - Text file for standard configuration.
ALTCFG.TXT - Text file for alternate configuration.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 3
Using the Command Line Version Of PAK
A Note on the Interface
This manual describes PAK's commands as they are initially
configured. Using PAKINST and the provided example files STDCFG.TXT
and ALTCFG.TXT, you can easily add, change, or delete the commands and
options which PAK understands. For example, if the 'A' command is too
cryptic for your taste, you can change it to 'Add' or 'Compress'.
The section on PAKINST describes how to change the interface.
Archive Files
PAK creates and modifies archive files, which have the .PAK or
.ARC extension. An archive file may contain one, two, or any number
of compressed files. Files in an archive retain all of the
information they had in the directory, such as name, size, and date.
In addition, each file in an archive has a calculated CRC number,
which assures the detection of damage after events such as file
transmission via modem.
Creating An Archive
The Add Command
To create an archive, type
PAK a <archive name> <file name or file names>
A is the Add command, and adding files to an archive will create
it if it doesn't exist. If the extension is omitted, PAK will look
first for a file with the extension PAK and then for ARC.
For example, if to add the file "FOO.DAT" to an archive named
"BAR.PAK" (which need not already exist), type
PAK a bar foo.dat
The wildcard characters ? and * are also permissible, as are
multiple file specifications. For example, to add all of the files
ending in ".DAT" to the same archive, and all of the files named
"TURBO" with any extension, type
PAK a bar *.dat turbo.*
Specifying a subdirectory will add all of the files in that
subdirectory. For example,
PAK a bak \c\lib
would add all of the files in the "\c\lib" directory to the
archive "BAK.PAK", provided that "\c\lib" was a subdirectory. Of
course, if "\c\lib" were simply a file, it would be added like any
other file.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 4
If you omit the file name, PAK assumes you mean "*.*", or all of
the files in the directory.
The Move Command
The Add command copies files to an archive, and leaves the
originals intact. The Move command also copies files to an archive,
but deletes the originals when the operation is successfully
completed. Using the Move command is very similar to the Add command.
To move a file or files, type
PAK m <archive name> <file name or names>
The Update Command
If a file specified in an Add or Move command has the same name
as a file already in the archive, PAK will ask if you wish to replace
the old file. The Update command behaves much as the Add command
does, except that it replaces existing archived files automatically if
they have an older date, and does not replace newer files. To update
a file or files, type
PAK u <archive name> <file name or names>
For example, suppose NEW1.DAT and NEW2.DAT existed in the archive
"SAVE.PAK", that the copy of NEW1.DAT in the archive was older than
the one on the disk, and that NEW3.DAT existed on the disk but not in
the archive. Then
PAK u save new1.dat new2.dat new3.dat
would add "NEW1.DAT" and "NEW3.DAT" to "SAVE.PAK".
The Freshen Command
The Freshen command is very similar to the Update command, except
that it only checks files which already exist in the archive. To
freshen files in an archive, type
PAK f <archive name> <file name or names>
For example,
PAK f total *.*
would check every file in the archive "TOTAL.PAK" and freshen any
which were older than those on the disk. Note that the "*.*" in the
above example is optional; if you omit the file list, PAK assumes you
intended all files in the directory.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 5
Extracting Files From An Archive
The Extract Command
To copy files from an existing archive to the disk, type
PAK e <archive name> <file name or names>
For example, to unpack all of the files from the archive
"GAME.PAK", type
PAK e game
Again, PAK assumes that you mean all of the files in the archive
if you omit the file names to be extracted. If one of the files to be
extracted already exists, PAK will stop and ask if you intend to
replace the existing file.
When using any command which does involve compression (i.e., the
Add, Move, Update and Freshen commands), you can use wildcards in
specifying the archive name. For example,
PAK e ch* *.doc
would extract all of the files with the extension .DOC from all
of the archives starting with the letters CH. As usual, PAK will
provide .PAK and .ARC if you omit the extension.
Extracting files to one or more remote subdirectories is much
like adding them from other subdirectories. For example,
PAK e project \c\objects\*.obj \c\source\*.c
would extract all of the files with the extension .OBJ to the
\C\OBJECTS directory, and all the files with the extension .C to the
\C\SOURCE directory.
The Extract and Remove Command
Sometimes you may wish to move files out of an archive rather
than simply copying them. To do this, type
PAK x <archive name> <file name or names>
The X command is like the Extract command in all ways except that
it deletes the files from the archive after unpacking them. If this
removes all of the files from the archive, leaving it empty, it also
deletes the archive.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 6
Extracting Files to the Screen or Printer
You can also extract files to the standard output, which is
normally the screen. To do so, type
PAK p <archive name> <file name or names>
Anything sent to the standard output can be re-directed to a
file, some other programs, or to the printer. For example,
PAK p docs >prn:
would extract all of the files from the archive DOCS and send
them to the printer.
For other uses of redirection, consult your DOS manual.
Managing Archives
Listing Files
Both the L and V commands display a list of files, the original
sizes, and the file dates, in much the same format as the MSDOS DIR
command. In addition, they display the type of compression,
compression ratio, the compressed size, time, and CRC checksum.
There is no difference between the two commands. Both L and V
are provided for the convenience of those used to PAK 1.0.
There are 7 compression types, created variously by ARC, PKARC,
and PAK. PAK can extract files compressed with any of these, and
compress new files with the Crunched, Squashed, or Crushed types.
-- No compression. Used by ARC, PKARC, PAK.
Packed Repeated byte values replaced by codes. Used by ARC.
Squeezed Huffman encoding, used by ARC 5.20 and earlier.
crunched Lempel-Zev compression, used by ARC 4.5 and earlier.
Crunched Lempel-Zev compression, used by ARC 5.0 and later.
Squashed Lempel-Zev compression, used by PKARC.
Crushed Lempel-Zev compression, used only by PAK.
PAK uses the CRC checksum to verify that the file is intact.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 7
Deleting Files
Sometimes you may wish to remove files from an archive, either
because they were added accidently or because they are no longer
useful. To delete files from an archive, type
PAK d <archive name> <file name or names>
For example,
PAK d junk *.tmp
would delete all the files ending in the ".TMP" extension from
the archive "JUNK.PAK".
Testing files
Sometimes the integrity of an archive (or any other file) is
suspect, such as after transmission by modem or after physical disk
damage. The Test command checks all the specified files to insure
that they are intact.
For example, to test the archive "POKER.PAK" which you have just
downloaded from a BBS, type
PAK t poker
PAK can also test multiple archives this way:
PAK t *.pak
would test all of the archives ending in the .PAK extension.
If, for some reason, you wish to test only some of the files, you
may specify a list of files, much as you can for any other command.
For example,
PAK t *.pak *.doc
will test only files ending in the .DOC extension.
Adding Remarks to Archives
PAK 1.5 supports variable length remarks for each file in an
archive, and for the archive as a whole. While there is no inherent
limitation to the length of a remark, PAK 1.5 currently only provides
commands to handle single-line remarks of at most 55 characters.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 8
The /R option
Adding the /R option to any other command (such as Add or List)
will enable remarks. For example,
PAK a /r saved *.pas
will add all the files with the extension .PAS to the archive
SAVED, and ask for the remark for each new file.
PAK l /r saved
would then include those remarks with the list of files in the
archive.
The Revise command
Sometimes you may wish to change the remarks in an archive.
Typing
PAK r saved *.doc
will first display the archive remark, and then display the files
with the extension .DOC one at a time, and ask for the new remark for
each. If you wish to keep the existing remark, simply press <enter>.
Converting Archives from ARC and PKARC
The C command extracts files from the archive and recompresses
them. This is primarily of use to convert older archives created with
ARC and PKARC to the better compression techniques used by PAK.
Example:
To convert all the files in BONZO.PAK, type:
PAK c bonzo
It is also possible to convert files created with PAK so that
they will be compatible with ARC or PKARC, by adding the C or S
compression type modifier:
PAK c /c bonzo
converts bonzo (created with PAK, PKARC, or PAK) to compression
types compatible with ARC and PKARC.
PAK c /s bonzo
converts bonzo to compression types compatible with PKARC.
Options
In addition to the commands, PAK supports a variety of options.
We've already mentioned a few in passing - the /R (remarks), /C
(crunch) and /S (squash) options.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 9
These options aren't necessary for the day-to-day use of PAK, but
occasionally you may wish to use them. Normally, these options appear
immediately after the command, separated by slashes (/). For example:
PAK a /opt1 /opt2 archive
While this is the normal ordering, it's not required, and the
options can appear anywhere on the line, provided each starts with the
slash character. For example,
PAK a archive /opt1 file /opt2
is also acceptable.
For compatibility with PAK 1.0, options may be jammed against the
command. For example,
PAK cc archive
is the same as
PAK c /c archive
This format is hard to read, and not recommended.
Moving Files (/M)
The Move option will delete files after compressing them or
extracting them. The M (move) and X (extract + delete) commands are
actually the Add and Extract commands with the Move option.
This option is primarily of use in combination with Update or
Freshen, which do not have matching Move commands.
Duplicate Files (/D)
The /D (duplicate) option selects only those files which are both
inside the archive and outside the archive. For example,
PAK e /d saved *.doc
would only extract those files with the .DOC extension which
matched existing files on the disk. The Freshen command is another
example of the /D option - it only adds those files which already
exist in the archive.
While of most use with the Add and Extract commands, the
Duplicate option can be used with other commands, such as List.
Replacing Existing Files (/W)
Normally, PAK asks before replacing an existing file, either in
an archive or on your disk. You can change this by adding one of
these options:
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 10
/WA Always replace existing files.
/WP Prompt before replacing existing files (normal).
/WO Replace older files.
/WN Never replace existing files.
The Update and Freshen commands automatically include the /WO
option.
Use Remarks (/R)
Adding the /R option to any other command (such as Add or List)
will enable remarks. For example,
PAK a /r saved *.pas
will add all the files with the extension .PAS to the archive
SAVED, and ask for the remark for each new file.
PAK l /r saved
would then include those remarks with the list of files in the
archive.
Crunch and Squash (/C and /S)
Using the /C or /S option will force PAK to use Crunching or
Squashing when compressing files. They are of primary use with the
Convert command, but they can also be used with Add, Move, Update, and
Freshen.
Encrypting Files (/G)
Occasionally you may wish to encrypt your archives with a
password. Files can still be listed in such archives, but they will
appear damaged unless extracted with the same password.
To encrypt files, type
PAK a /g<password> <archive name> <file name or names>
The 'g' option stands for Garble. Passwords used with the Garble
command are converted to all uppercase. For example, to encrypt the
file "SECRET.EXE" in the archive "DARK.PAK" with the password "DEEP",
type
PAK a /gDEEP dark secret.exe
To extract it later, type
PAK e /gDEEP dark secret.exe
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 11
While these are the most common uses of Garble, Garble can also
be used with any of the other commands. For example, testing the
example encrypted archive requires the use of the Garble command:
PAK t /gDEEP dark
Sorting Files (/O)
PAK supports sorting of archives by filename + extension (the
normal method, used in release 1.0), extension + filename, time, size,
or no sort at all. To enable a sorting method, include one of these
options:
/ON for filename + extension
/OE for extension + filename
/OT for time
/OS for size
/O- for no sort
For example,
PAK a /OT newmail mail*.*
will add the all files starting with MAIL to the archive NEWMAIL
in the order of the date and time of the files. On the other hand,
PAK l /OS saved
would list all of the files in an archive in the order of their
fully-expanded size, regardless of the actual order in SAVED.
Note that adding any file to an archive will result in PAK
sorting the archive. In the first example above, all of the files in
the archive NEWMAIL would be sorted by time, even if they were
previously sorted by some other method.
The standard sort for the compression commands (Add, Move,
Update, Freshen) is by filename + extension. For other commands, the
standard is no sorting.
Pack Archives (/P)
Archives rarely compress, so normally PAK does not attempt to do
so, which saves time. Adding this option will force PAK to try and
compress archive files.
The Temporary Path (/T)
You can specify a path for temporary files, like so:
PAK c /tC: doodle
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 12
Whenever PAK makes any change (adding or deleting a file) to an
archive, PAK must create a temporary file for the changed archive. If
you are working on floppy disks, this limits the maximum size of an
archive to half the volume of the disk, since the old copy and the new
copy must exist at the same time. If you use this option to specify a
temporary path (such as C:), and you are working on drive A: or B:,
PAK will create this temporary file in the Temporary Path and copy it
over the old file when everything is done. This allows archives up to
the full size of a floppy.
PAK also needs a temporary file if you Print or Convert a file
which is larger than what PAK can hold in memory (this is always
limited to 64K, even if you have more). PAK will always try to use
the Temporary Path to create this file.
If the Temporary Path is invalid, PAK will use the directory of
the archive instead.
General Syntax
The command format for PAK is:
PAK <command> [/opt, /opt...] <arcname> [<filename>, <filename> ...]
<command> is a command.
[/opt] is zero or more options.
<arcname> is the name of the archive to operate on, which may
include the "wildcard" characters * or ?, provided <command> is not
one of the compression commands (Add, Move, Update, or Freshen).
<filename> is one or more file names. Filenames may include the
"wildcard" characters * and ?. If you specify a directory or a disk
drive, PAK will use all files in that directory. If you don't list
any files or directories, PAK assumes you mean all the files in the
current directory.
Simply typing PAK will print a short list of commands.
Summary of Standard PAK Commands
Commands:
A Add files to archive M Move files to archive
U Update archive files F Update duplicate files
E Extract files from archive X Move files from archive
D Delete files L List files
V List files P Display files
T Test files C Convert files
R Revise remarks
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 13
Options:
/m = move files
/c = make ARC compatible files (Crunched).
/s = make PKARC compatible files (Squashed).
/g = encrypt the file with a password.
/t = use temporary path
/d = use only duplicate files.
/wa = always replace existing files
/wp = prompt before replacing existing files (normal)
/wo = replace older files
/wn = never replace existing files
/r = use remarks
/on = filename + extension order
/oe = extension + filename order
/ot = time order
/os = size order
/o- = no order
/p = pack archives
Limitations
PAK can handle at most 16,000 files at once, though this may also
be limited by available memory.
PAKINST (PAK install program)
PAKINST manipulates PAK.CNF, the configuration file for PAK.
Since PAK.CNF contains the definition of PAK's user interface, PAK
cannot run without it. You can use PAKINST to tell PAK where to look
for PAK.CNF, to translate PAK.CNF into a text-format configuration
file, or to translate a text-format configuration file into PAK.CNF.
Included with PAK 1.5 are two example text-format configuration
files, STDCFG.TXT and ALTCFG.TXT. By creating your own configuration
files with a word processor, or by altering the provided examples, you
can customize PAK's commands to suit your needs.
PAKINST must always be run in the same directory with PAK and
PAK.CNF. To run PAKINST, simply type
PAKINST
PAKINST provides four choices:
set [D]irectory
convert [T]ext to PAK.CNF
convert [P]AK.CNF to text
and [Q]uit
To set the directory where PAK looks for PAK.CNF, select D.
To create a new PAK.CNF from a properly-formatted text file,
select T.
To create a text file from PAK.CNF, select P.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 14
Command Definitions
A command definition in text-format file looks like this:
<command> = <PAK command> [+ <PAK options>], "<help definition>"
The <command> is the command as it will be used with PAK, i.e.
'A' or 'Add'. Commands must start with a letter, and may contain no
spaces, but may be may be any length.
The <PAK command> is one of ADD, EXTRACT, DELETE, LIST, VIEW,
TEST, CONVERT, or REVISE. These correspond to the standard PAK
commands of A, E, D, L, P, T, C, and R.
The command may also include one or more <PAK options>, separated
by the plus (+) symbol. Each <PAK option> is one of MOVE, CRUSH,
CRUNCH, SQUASH, PASSWORD, DUPLICATE, REMARK, PACK_ARCHIVES, NAME_SORT,
TIME_SORT, SIZE_SORT, EXT_SORT, NO_SORT, ALWAYS_REPLACE,
PROMPT_REPLACE, REPLACE_OLDER, NEVER_REPLACE, or TEMP_PATH. All of
these are covered in more depth in the section 'Using The Command Line
Version of PAK'.
Finally, separated from the commands and options by a comma and
enclosed in quotation marks is the help definition for this command.
The PAK help screen, obtained by typing PAK by itself, will display
the text within these quotation marks after the command.
For example, the Freshen command (F) in the STDCFG.TXT file looks
like this:
F = Add + Duplicate + Replace_Older + Name_Sort,
"Update duplicate files"
Reading this literally, PAKINST takes this as 'F means add files
to the archive, selecting only duplicate files, replacing older files,
and sorting by name. When asked for help, display F followed by the
text "Update duplicate files".'
Notice that this does not all have to be on the same line.
Option Definitions
An option definition looks like this:
/<option> = <PAK option> [+ <PAK options>], "<help definition>"
This is much like a command definition, only it begins with a
slash (/) to indicate it is an option. Options, of course, may not
include PAK commands.
Comments
Text configuration files may include comments. PAKINST will
ignore anything contained in curly braces {} or Pascal comment symbols
(* *). For example,
{ This is a comment. }
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 15
(* So is this. *)
EXEMAKE (Make self-extracting archives)
EXEMAKE is a utility to transform any archive created by PAK into
a self-extracting EXE file, at a cost of 6662 extra bytes.
EXEMAKE uses the following command format:
EXEMAKE <archive> [<target file>]
If the target file is not specified, EXEMAKE creates a file with
the same name as the archive but with the .EXE extension.
For example,
EXEMAKE product
will create the file "PRODUCT.EXE", which contains all of the
files in "PRODUCT.PAK". Typing
PRODUCT
will then create all of the files from the original archive.
Self-extracting archives created with EXEMAKE can take one parameter:
the destination directory.
PRODUCT b:\new
extracts all of the files to the B:\NEW directory.
Appendices
Release History
Release 1.51 (January 15th, 1989):
Fixed bug in EXEMAKE with extraction of files over 64K.
EXEMAKE fixes increase self-extraction overhead to 6674 bytes.
Release 1.5 (January 12th, 1989):
Added remarks.
Added support for wildcards in specifying archives.
Added extraction to standard output.
Added sorting options.
Added temporary path.
Added configurable interface.
Added target directory parameter to self-extracting archives.
Improved error reporting.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 16
Reduced size overhead for self-extracting archives to 6662 bytes.
Fixed bug in the Move command.
Fixed problem with handling large numbers of files.
Fixed bug with EXEMAKE forcing the name of the output .EXE to
that of the input archive.
PAK Release 1.0 (October 17th, 1988):
Initial release as PAK.
GSARC Release 1.0 (October 13th, 1988):
Limited release.
PAK's Advanced Compression
ARC popularized the LZW method of compression, which substitutes
9 to 12 bit codes for strings of characters which occur more than once
in a file. PKARC made a very simple modification to the compression
algorithm in ARC, by allowing codes of up to 13 bits, and hence
doubled the number of allowable codes. PKARC owes some of its
popularity over ARC to this, but its primary advantage is speed.
PAK, on the other hand, makes some radical changes to the LZW
method. PAK increases the range from 2 to 13 bits instead of 9 to 13,
dynamically alters the compression method based on the local nature of
the data, and drops only the least used codes when the code table
fills, instead of all of them as ARC and PKARC do.
As a result, PAK performs much better on very large files, very
small files, and on difficult files (such as .EXE and .COM files) of
any length.
Technical Notes on File Formats
In the interest of simplifying the creation of utilities by
third-party developers, this section provides a short description of
the file format for archives created with PAK.
In the basic format for archives, each archived file has a header
which looks like this:
Marker (1 byte) - always 26 (^Z, the eof mark for text files).
Version (1 byte) - type of compression used.
Name (13 bytes) - an ASCIIZ string.
Size (4 bytes) - a long integer giving the current file size.
Date (2 bytes) - packed date. bits 0-4 = day 5-8 = month
9-15 = year - 1980.
Time (2 bytes) - packed time. bits 0-4 = second / 2 5-10 = minute
11-15 = hour.
CRC (2 bytes) - the CRC checksum for the expanded file.
Length (4 bytes) - original length of file.
PAK (C) 1988, 1989 NoGate Consulting Jan 12th 1989 Page 17
The version field currently has the following values:
0 End of file. File header is only 2 bytes long (26 and 0).
1 No compression. File header lacks the Length field.
2 No compression.
3 Run-length encoding (RLE).
4 Huffman squeezing.
5 Fixed-length 12 bit LZW compression.
6 As above, with RLE.
7 As above, but with a different hashing scheme.
8 Variable-length 9-12 bit LZW compression with RLE.
9 Variable-length 9-13 bit LZW compression without RLE.
10 Crushing.
Basic archives end with a short header, containing just the
marker (26) and the end of file value (0). PAK release 1.5 extends
this format by adding information after this end of file marker. Each
extended record has the following header:
Marker (1 byte) - always 254
type (1 byte) - type of record
File (2 bytes) - # of file in archive to which this record refers,
or 0 for the entire archive.
length (4 bytes) - size of record
Currently, the only values for the Type field are 0 (end of file)
and 1 (remark). PAK 1.5 considers any value between 0 and 20 to be
valid, though it discards any records with values over 1.
NoGate Consulting has specific purposes planned for types 2-4.
Credits
We would like to thank several people:
The various authors of the public-domain De-Arc'ing utility, for
providing insights into the (sometimes very strange) internal workings
of ARC:
Roy Collins, David W. Carroll, Richard P. Byrne, Robert D. Tolz,
and Jim North.
We must also credit Terry A. Welch, whose article "A Technique
for High Performance Data Compression", IEEE Computer Vol 17 No 6
(June 1984) seems to have started all the research on Lempel-Zev
coding.
Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James
A. Woods, and Joe Orost, who are the authors of the UNIX compress
utility.
And all of the people whose suggestions we added to this release
of PAK, such as the temporary path, sorting, wildcards for archives,
and remarks.